﻿using System.Collections.Generic;
using Dost.Khcn.Data.EntityModel;
using Dost.Khcn.Data.Implements;
using Dost.Khcn.Data.Interfaces;

namespace Dost.Khcn.Biz
{
    public class QuaTrinhCongTacBiz
    {
        #region Properties

        private IQuaTrinhCongTacDao _quaTrinhCongTacDao;

        private IQuaTrinhCongTacDao QuaTrinhCongTacData
        {
            get
            {
                return (_quaTrinhCongTacDao ?? (_quaTrinhCongTacDao = new QuaTrinhCongTacDao()));
            }
        }

        #endregion

        public List<QuaTrinhCongTac> GetQuaTrinhCongTacs(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : QuaTrinhCongTacData.GetQuaTrinhCongTacs(chuyenGiaId);
        }

        public QuaTrinhCongTac Create(QuaTrinhCongTac quaTrinhCongTac)
        {
            return QuaTrinhCongTacData.Create(quaTrinhCongTac);
        }

        public void Update(QuaTrinhCongTac quaTrinhCongTac)
        {
            QuaTrinhCongTacData.Update(quaTrinhCongTac);
        }

        public void Delete(int id)
        {
            QuaTrinhCongTacData.Delete(id);
        }
    }
}
